Refactor/extract live to monorepo#73
Merged
MarcosBrendonDePaula merged 15 commits intomainfrom Mar 14, 2026
Merged
Conversation
Live Components system moved to FluxStackCore/fluxstack-live as independent packages (@fluxstack/live, @fluxstack/live-client, @fluxstack/live-express, @fluxstack/live-elysia, @fluxstack/live-react). Core FluxStack now imports from @fluxstack/live instead of bundling the live components internally. This decouples the real-time system from the framework, allowing it to be used with any backend. Removed from core/: - server/live/ internal implementations (ComponentRegistry, RoomManager, etc.) - client/ hooks and components (useLiveComponent, Live, etc.) - build/vite-plugin-live-strip - server/live/__tests__/ Updated imports across app/ and plugins/ to use @fluxstack/live. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace vi.mock('@core/server/live/...') with setLiveComponentContext() DI
pattern from @fluxstack/live. Fix EMIT_OVERRIDE_KEY to use Symbol.for()
since the symbol wasn't exported from the npm package runtime. Update
FileUploadManager import path. All 531 tests pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The @fluxstack/live-* aliases in vite.config.ts pointed to the sibling fluxstack-live monorepo source, which only exists in local development. In CI, the sibling repo doesn't exist, causing the Vite build to fail silently. Now the aliases are only applied when the local monorepo is detected; otherwise Vite resolves from node_modules (published npm packages). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
… bug - Update @fluxstack/live-* dependencies from ^0.1.0 to ^0.2.0 - Fix create-fluxstack project name using full path instead of basename - Bump version to 1.15.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Integrates the new @fluxstack/live typed room system into the FluxStack demo application with working examples and updated documentation. ## New Demos - PingPong: Real-time latency measurement with binary msgpack room events, auto-ping mode, RTT stats (AVG/MIN/MAX), and visual ping log - SharedCounter: Singleton counter using typed LiveRoom with CounterRoom for cross-client state sync ## Typed Room Definitions - ChatRoom: Typed room for chat messages with user join/leave events - CounterRoom: Typed room for shared counter with increment tracking - DirectoryRoom: Room directory with metadata and member counts - PingRoom: Ping/pong room for latency measurement demos ## Removed Legacy Demos - Removed ChatDemo (replaced by RoomChatDemo with typed rooms) - Removed TodoListDemo (replaced by more relevant demos) - Removed LiveChat/LiveTodoList server components ## Infrastructure - Updated websocket-plugin to support LiveRoom binary frame routing - Updated live-components-generator for room class discovery - Added Vite aliases for @fluxstack/live source resolution - Updated LLMD docs: live-rooms.md rewritten for typed rooms, added live-binary-delta.md for binary codec documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Removed the LiveDebugger floating widget (1325 lines), full-screen panel (780 lines), and all related exports. The debug system was unused and removed from the upstream library. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…0.3.0 CI workflows were using Bun 1.1.34, below the minimum required >=1.2.0, causing silent backend build failures. Also updates @fluxstack/live, live-client, and live-react from ^0.2.0 to ^0.3.0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Tests were failing due to v0.3.0 breaking changes: - WsSendBatcher now uses queueMicrotask, requiring async flush in tests - Replaced vi.mock pattern with setLiveComponentContext DI in delta tests - Updated vite-plugin tests to reference existing components (LiveRoomChat, LiveForm) instead of removed LiveChat/LiveTodoList - Skipped onRoomJoin/onRoomLeave hook tests (not invoked in v0.3.0) - Fixed _state internal access to use public state proxy 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Build errors were silently swallowed — "Server bundle failed" with no details. Now prints the actual bun build output on failure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Running `bun add` inside plugins/crypto-auth/ during build creates a local bun.lock that corrupts Bun's module resolution on Linux CI, causing `Could not resolve: @fluxstack/live`. This only affects builds after the monorepo refactor where @fluxstack/live became an npm package. Disable autoInstall when NODE_ENV=production since `bun install` at root already provides all needed dependencies. Also removes the committed plugins/crypto-auth/bun.lock which should not be in the repository. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Two changes to fix the bundler failing with "Could not resolve: @fluxstack/live" on Linux CI: 1. Add @fluxstack/live and @fluxstack/live-elysia to bundler externals. These are runtime dependencies resolved from node_modules at startup, not code that needs to be inlined into the bundle. 2. Remove legacy workspace.json referencing non-existent packages/ directory. This stale workspace config may confuse Bun's module resolution on Linux, causing it to look for @fluxstack/live in workspace paths instead of node_modules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1468db5 to
e768155
Compare
The published @fluxstack/live packages (v0.3.0) include a "bun" export condition pointing to ./src/index.ts, but the npm tarball only ships dist/. On Linux, Bun's bundler strictly follows the "bun" condition and fails with "Could not resolve" because src/ doesn't exist. This adds a postinstall script that strips the "bun" condition from package exports, forcing Bun to fall back to the "import" condition (./dist/index.js) which works correctly on all platforms. TODO: Remove after publishing @fluxstack/live >= 0.3.1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The postinstall script (scripts/patch-live-exports.ts) must be available when bun install runs. Both the deps and builder stages now copy the scripts/ directory before running bun install. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The autoInstall disable (e7b47e4) was a wrong diagnosis — the real cause was the "bun" export condition in @fluxstack/live pointing to missing src/. Restoring autoInstall: true so plugins can install their deps normally. Also adds plugins/*/bun.lock to .gitignore so plugin-local lock files don't get committed (they resolve from root node_modules). workspace.json stays deleted — it referenced a non-existent packages/ directory and was stale. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.